const obj = {
  name: "xjh",
  age: 10,
};

const objProxy = new Proxy(obj, {
  get: function (target, key, receiver) {
    console.log("get------------");
    console.log(receiver == objProxy); // true
    // 如果我之前的值是不能 获取的,这个 Reflect 会监听到相应的问题, 也就是 `this`
    return Reflect.get(target, key, receiver);
  },
  // 设置
  set: function (target, key, newValue) {
    console.log("set----------");
    Reflect.set(target, key, newValue);
  },

  has(target, key) {},

  deleteProperty(target, key) {},
});

// objProxy.age = 31;
console.log(objProxy.age);
